package java8_23;

/**
 * @author oldliu
 * @since 1.0
 */
public class Animal {
    private String name;
    private int age;
    private String color;

    //!!!!!!!!!!!
    private String type;//不同种类的动物

    public Animal(String name, int age, String color, String type) {
        this.name = name;
        this.age = age;
        this.color = color;
        this.type = type;
    }

    public void eat(){//有参数，简化了。。
        System.out.println(name+"在吃饭。。。");
    }
    public void sleep(){
        System.out.println(name+"睡觉");
    }
    public void swim(){
        System.out.println(name+"在游泳");
    }
    public void layEggs(){
        System.out.println(name+"在下蛋");
    }
    public void fly(){
        System.out.println(name+"在飞翔");
    }
    public void digHole(){
        System.out.println(name+"在打洞");
    }
}
